home *** CD-ROM | disk | FTP | other *** search
- ; DESC: Closes a file handle V1.00
- ; IN: *{INHNDL} handle of file to be closed
- ; SAMPLE: Callm CLOSE,<INHNDL>,
- ; ##################################################################
-
- Extrn PUSHALL:Near
- Extrn POPALL:Near
- Extrn ERRORMSG:Near
-
- CLOSEC Segment
- Assume CS:CLOSEC
- Public CLOSE
-
- ;notice.
- DB 'CLOSE - V1.00, Copyright 1987, CoreTechs ',0DH,0AH
-
- CLOSE Proc Near ;closes a file.
- Call PUSHALL
-
- Pop BX ;get the handle.
-
- Mov AH,3EH ;close a file.
- Int 21H
- Jc ERROR ;if error report it.
-
- Call POPALL
- Ret
-
- ERROR: Push AX ;report error and abort.
- Call ERRORMSG
-
- CLOSE Endp
- CLOSEC Ends
- End